﻿
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[sproc_BBSGetBoardMaster]') AND type in (N'P', N'PC'))
    DROP PROCEDURE [dbo].[sproc_BBSGetBoardMaster];
GO
CREATE PROCEDURE [dbo].[sproc_BBSGetBoardMaster] 
    @board_id int
/*

==========================================================
功能:    得到版块版主
参数:
    @board_id int        :    版块ID
==========================================================

*/
AS
SELECT * 
    FROM uds_staff
    WHERE staff_id IN (SELECT staff_id 
                FROM uds_bbs_boardmaster 
                WHERE board_id =@board_id
                )